package com.itany.corejava.day16;

public class TestThreadB {

    public static void main(String[] args) {

        MyRunnable r=new MyRunnable();


        Thread t1=new Thread(r);
        t1.start();


        Thread t2=new Thread(r);
        t2.start();

        for (int i = 0; i < 100; i++) {
            System.out.println("main"+i);
        }


    }

}

class MyRunnable implements Runnable{

    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            System.out.println("run"+i);
        }
    }
}